package com.dd.cloud.user.service.drugs;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dd.cloud.user.entity.drugs.DrugsWarehousing;
import com.dd.cloud.user.req.drugs.AddDrugsWarehousingReq;
import com.dd.cloud.user.req.drugs.DrugsQtyPageReq;
import com.dd.cloud.user.req.drugs.DrugsWarePageReq;
import com.dd.cloud.user.res.drugs.DrugsQtyPageRes;
import com.dd.cloud.user.res.drugs.DrugsQtyRes;
import com.dd.cloud.user.res.drugs.DrugsWarePageRes;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 药品入库记录表 服务类
 * </p>
 *
 * @author czg
 * @since 2023-04-18
 */
public interface IDrugsWarehousingService extends IService<DrugsWarehousing> {

    /**
     * 添加药品入库记录
     */
    void addDrugsWarehousing(AddDrugsWarehousingReq req);


    /**
     * excel批量导入入库记录
     */
    Map<String, String> importExcelDrugsWare(MultipartFile file);

    /**
     * 分页查询入库记录
     */
    Page<DrugsWarePageRes> getDrugsWarePage(DrugsWarePageReq req);

    /**
     * 查询药品库存列表
     */
    Page<DrugsQtyPageRes> getDrugsQtyPage(DrugsQtyPageReq req);

    /**
     * 查询是否还有库存
     */
    List<DrugsQtyRes> getDrugsIsHaveQty(String drugnums, Integer pharId);
}
